<%-- 
    Document   : asistenciaReuniones
    Created on : 08-11-2012, 08:38:02 PM
    Author     : Jorgore
--%>
<%@ page import="com.uca.sisbec.mapping.Reunion" %>
<%@ page import="com.uca.sisbec.forms.becario.MotivoReunionForm" %>
<%@include file ="/include/header.jsp"%>
<script>
    function seleccionarReunion(){
        var form = document.getElementById("asistenciaForm");
        form.cmd.value = "seleccionar";
        form.submit();
    }
    
    function guardarAsistencia(){
        var form = document.getElementById("asistenciaForm");
        form.cmd.value = "guardar";
        form.submit();
    }
</script>
                <div class="content">
                    <html:form action="/Asistencia" styleId="asistenciaForm">
                        <html:hidden property="cmd" value="" />
                        <table class="form">
                            <caption class="titleSeg">Asistencia reuniones</caption>
                            <tr class="campos">
                                <td align="center" valign="top" colspan="5">Reuni&oacute;n:&nbsp;&nbsp;
                                    <html:select property="reunion" styleClass="tinput200" onchange="seleccionarReunion();">
                                        <html:option value="">Seleccione una opci&oacute;n</html:option>
                                        <html:options collection="reunionesList" property="codigo"
                                        labelProperty="nombre" labelName="nombre" ></html:options>
                                    </html:select>
                                </td>
                            </tr>
                            <logic:present name="reunionBean" scope="request">
                                <bean:define id="reunion" name="reunionBean" scope="request" />
                            <tr class="campos">
                                <td class="label">Tema:&nbsp;&nbsp;</td>
                                <td class="control"><b><bean:write name="reunion" property="tema" /></b></td>
                                <td width="30px"></td>
                                <td class="label">Ponente:&nbsp;&nbsp;</td>
                                <td class="control"><b><bean:write name="reunion" property="ponente" /></b></td>
                            </tr>
                            <tr class="campos">
                                <td class="label">Lugar:&nbsp;&nbsp;</td>
                                <td class="control"><b><bean:write name="reunion" property="lugar" /></b></td>
                                <td width="30px"></td>
                                <td class="label">Hora y Fecha:&nbsp;&nbsp;</td>
                                <td class="control"><b><bean:write name="reunion" property="horafechaReunionStr" /></b></td>
                            </tr>
                            </logic:present>
                        </table>
                        <logic:present name="becariosList">
                        <center>
                            <div style="text-align: left;width: 700px;">
                                <div style="width:663px">
                                    <table class="form" style="border: 1px solid">
                                        <tr style="background-color: #ddd">
                                            <th rowspan="2" valign="middle" width="100px">Carnet</th>
                                            <th rowspan="2" valign="middle" width="300px">Apellidos, Nombre</th>
                                            <th rowspan="2" valign="middle" width="50px">Asisti&oacute;</th>
                                            <th colspan="4" valign="middle">No asisti&oacute;</th>
                                        </tr>
                                        <tr style="background-color: #ddd">
                                            <th valign="middle" width="50px">TR</th>
                                            <th valign="middle" width="50px">TC</th>
                                            <th valign="middle" width="50px">EN</th>
                                            <th valign="middle" width="50px">SP</th>
                                        </tr>
                                    </table>
                                </div>
                                <div style="width: 680px;height: 400px;overflow-x: hidden; overflow-y: scroll">
                                    <table class="form" style="border: 1px solid">
                                        <tr>
                                            <th width="100px"></th>
                                            <th width="300px"></th>
                                            <th width="50px"></th>
                                            <th width="50px"></th>
                                            <th width="50px"></th>
                                            <th width="50px"></th>
                                            <th width="50px"></th>
                                        </tr>
                                    <logic:iterate id="becariosList" name="becariosList"  indexId="index">
                                        <tr class="campos">
                                        <nested:nest property='<%="motivo("+index+")"%>'>
                                            <nested:hidden property="carnet" />
                                            <td valign="middle" style="text-align: center"><nested:write property="carnet" /></td>
                                            <td valign="middle" style="text-align: left;"><nested:write property="nombre" /></td>
                                            <td valign="middle" style="text-align: center"><nested:radio property="motivo" value="AS" /></td>
                                            <td valign="middle" style="text-align: center"><nested:radio property="motivo" value="TR" /></td>
                                            <td valign="middle" style="text-align: center"><nested:radio property="motivo" value="TC" /></td>
                                            <td valign="middle" style="text-align: center"><nested:radio property="motivo" value="EN" /></td>
                                            <td valign="middle" style="text-align: center"><nested:radio property="motivo" value="SP" /></td>
                                        </nested:nest>
                                        </tr>
                                    </logic:iterate>
                                    </table>
                                </div>
                            </div>
                        </center>
                        <table class="form">
                            <tr class="control">
                                <td class="botones">
                                    <html:button property="guardar" value="Guardar" onclick="guardarAsistencia()" styleClass="button" />
                                </td>
                            </tr>
                        </table>
                        <br />
                        <br />
                        </logic:present>
                    </html:form>
                </div>
<%@include  file="/include/footer.jsp"%>
                